var t = function(t) {
    return (t = t.toString())[1] ? t : "0" + t;
};

module.exports = {
    formatTime: function(e) {
        var n = e.getFullYear(), r = e.getMonth() + 1, a = e.getDate(), u = e.getHours(), o = e.getMinutes(), g = e.getSeconds();
        return [ n, r, a ].map(t).join("/") + " " + [ u, o, g ].map(t).join(":");
    },
    formatNumber: t,
    throttle: function(t, e) {
        null != e && null != e || (e = 5e3);
        var n = null;
        return function() {
            var r = +new Date();
            (r - n > e || !n) && (t.apply(this, arguments), n = r);
        };
    },
    getWeek: function(t) {
        return 0 == t.getDay() ? "日" : 1 == t.getDay() ? "一" : 2 == t.getDay() ? "二" : 3 == t.getDay() ? "三" : 4 == t.getDay() ? "四" : 5 == t.getDay() ? "五" : 6 == t.getDay() ? "六" : void 0;
    }
};